﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Administrator/MasterPage.master" AutoEventWireup="false" CodeFile="BranchList.aspx.vb" Inherits="Administrator_BranchList" %>

<%@ Register Assembly="DevExpress.Web.v14.1, Version=14.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table style="width:100%;">
                <tr>
                    <td align="right" width="150">
                        <asp:Label ID="lblDepartment" runat="server" CssClass="control"></asp:Label>
                    </td>
                    <td align="left" >
                        <asp:DropDownList ID="ddlDepartment" runat="server" AutoPostBack="True" 
                            CssClass="control" Height="25px" Width="238px">
                        </asp:DropDownList>
                        <%--<dx:ASPxComboBox ID="ddlDepartment" runat="server" ValueType="System.String" 
                            CssClass="control" Height="25px" Width="238px" IncrementalFilteringMode="Contains"
                            AutoPostBack="true">
                        </dx:ASPxComboBox>--%>
                    </td>
                    <td align="right" >
                        <asp:Label ID="lblZone" runat="server" CssClass="control"></asp:Label>
                    </td>
                    <td align="left" >
                        <asp:DropDownList ID="ddlZone" runat="server" CssClass="control" Width="216px" 
                            Height="25px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="height: 25px">
                        <asp:Label ID="lblBranchCode" runat="server" CssClass="control"></asp:Label>
                    </td>
                    <td align="left" style="height: 25px" >
                        <asp:TextBox ID="txtBranchCode" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="5" Width="144px"></asp:TextBox>
                    </td>
                    <td align="right" style="height: 25px">
                        <asp:Label ID="lblBranchName" runat="server" CssClass="control"></asp:Label>
                    </td>
                    <td style="height: 25px" align="left">
                        <asp:TextBox ID="txtBranchName" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="150" Width="299px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="height: 25px">
                        <asp:Label ID="lblSOLId" runat="server" CssClass="control"></asp:Label>
                    </td>
                    <td align="left" style="height: 25px" >
                        <asp:TextBox ID="txtSOLId" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="5" Width="144px"></asp:TextBox>
                    </td>
                    <td align="right" style="height: 25px">
                        <asp:Label ID="lblCbsSolId" runat="server" CssClass="control"></asp:Label>
                    </td>
                    <td style="height: 25px" align="left">
                        <asp:TextBox ID="txtCbsSolId" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="5" Width="144px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right" colspan="4">
                        <asp:Button ID="btnSearch" runat="server" CssClass="control" Text="search" 
                            Width="80px"  />
                        <asp:Button ID="btnAdd" runat="server" CssClass="control" Text="Add" 
                            Width="80px" />
                        <asp:Button ID="btnModify" runat="server" CssClass="control" Text="Modify" 
                            Width="80px" />
                        <asp:Button ID="btnDelete" runat="server" CssClass="control" Text="Delete" 
                            Width="80px" />
                        <asp:Button ID="btnClear" runat="server" CssClass="control" Text="Clear" 
                            Width="80px" />
                        <asp:Button ID="btnPrint" runat="server" CssClass="control" Text="Print" 
                            Width="80px"  />
                    </td>
                </tr>
            </table>
            <div align="center">

        <asp:Label ID="lblMsg" runat="server" CssClass="control" Font-Size="XX-Large" 
                        ForeColor="Red" Height="30px" style="text-align: center" 
                    Font-Bold="True"></asp:Label>
            <asp:GridView ID="gvBranch" runat="server" AllowPaging="True" 
                AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
                CssClass="control" ForeColor="#333333" Width="100%">
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                <FooterStyle BackColor="#E38120" Font-Bold="True" ForeColor="White" />
                <RowStyle ForeColor="#333333" />
                <PagerSettings Mode="NumericFirstLast" />
                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" 
                    CssClass="cssPager" />
                <SelectedRowStyle BackColor="#FFFFCC" Font-Bold="True" ForeColor="Navy" />
                <HeaderStyle BackColor="#E38120" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:CommandField ButtonType="Image" 
                        SelectImageUrl="~/img/icon/select_icon.gif" ShowSelectButton="True">
                    <ItemStyle Width="3%" />
                    </asp:CommandField>
                    <asp:BoundField DataField="DeptName" HeaderText="ฝ่าย" 
                        SortExpression="DeptCode">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="เขต" SortExpression="ZONENAME">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# eval("ZONENAME") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" Width="15%" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="BranchCode" HeaderText="รหัส" ReadOnly="True" 
                        SortExpression="BranchCode">
                    <ItemStyle HorizontalAlign="Center" Width="10%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="DEPTCODE" HeaderText="DEPTCODE" />
                    <asp:BoundField DataField="BranchName" HeaderText="ชื่อส่วนงาน/สาขา" 
                        ReadOnly="True" SortExpression="BranchName">
                    <ItemStyle HorizontalAlign="Left" Width="30%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ZoneCode" HeaderText="ZoneCode" />
                    <asp:BoundField DataField="SOL_ID" HeaderText="รหัส ปปง." SortExpression="SOL_ID" />
                    <asp:BoundField DataField="CBS_SOL_ID" HeaderText="รหัส CBS" SortExpression="CBS_SOL_ID" />
                </Columns>
            </asp:GridView>
            </div>
            <div align="right">
                   <asp:Label ID="lblTotal" runat="server" Font-Bold="True" ForeColor="#003300"></asp:Label>
             </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

